<template>
  <div>
    <CartgroySelect :disabled="isShowValue !== 1"></CartgroySelect>
    <SpuList v-if="isShowValue === 1" @isShow="isShow" />
    <AddOrUpdateSpu v-else-if="isShowValue === 2" @isShow="isShow" />
    <AddSku v-else @isShow="isShow" />
  </div>
</template>

<script lang="ts">
export default {
  name: "CSpu",
};
</script>

<script lang="ts" setup>
import CartgroySelect from "@/components/CartgroySelect/index.vue";
import SpuList from "./compontents/spu-list.vue";
import AddOrUpdateSpu from "./compontents/add-or-updatespu.vue";
import AddSku from "./compontents/add-sku.vue";
import { ref } from "vue";
const isShowValue = ref(1);
const isShow = (num: number) => {
  isShowValue.value = num;
};
</script>

<style scoped></style>
